Skip to content

[15.0][IMP] stock_inventory_lockdown: add hook to decide what locations are excluded from the lockdown#2354

Merged
OCA-git-bot merged 1 commit intoOCA:15.0from
ForgeFlow:15.0-imp-stock_inventory_lockdown
May 29, 2025
Merged

[15.0][IMP] stock_inventory_lockdown: add hook to decide what locations are excluded from the lockdown#2354
OCA-git-bot merged 1 commit intoOCA:15.0from
ForgeFlow:15.0-imp-stock_inventory_lockdown

Conversation

@AaronHForgeFlow
Copy link
Copy Markdown
Contributor

Some companies may don't want to block all inventory loss locations and some others will want to block other types of locations.

This is just a hook, no change by itself 🙏

@AaronHForgeFlow AaronHForgeFlow force-pushed the 15.0-imp-stock_inventory_lockdown branch from 67c9b19 to cfa6239 Compare May 22, 2025 13:39
@AaronHForgeFlow
Copy link
Copy Markdown
Contributor Author

AaronHForgeFlow commented May 27, 2025

Failing tests already exists in main Odoo15 branch: https://github.com/OCA/stock-logistics-warehouse/actions/runs/15157529327/job/42615744592 I will try to fix it in a separate PR

Edit: It seems a rebase did the thing 😕

Comment on lines +21 to +26
def _location_usage_without_restriction(self, move_line):
return (
move_line.location_dest_id.usage == "inventory"
or move_line.location_id.usage == "inventory"
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to pass move_line as self, and then in this method you evaluate self

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I just did it! 🚀

… excluded from the lockdown

some companies may don't want to block all inventoty loss locations and some others will want to block
other types of locations
@AaronHForgeFlow AaronHForgeFlow force-pushed the 15.0-imp-stock_inventory_lockdown branch from 86488cb to 202bc2a Compare May 27, 2025 15:36
@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Copy Markdown
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 15.0-ocabot-merge-pr-2354-by-LoisRForgeFlow-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9a75cc1 into OCA:15.0 May 29, 2025
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 4d97fa6. Thanks a lot for contributing to OCA. ❤️

@LoisRForgeFlow LoisRForgeFlow deleted the 15.0-imp-stock_inventory_lockdown branch May 29, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants